<?php 
defined('IN_TS') or die('Access Denied.');

include 'userinfo.php';

$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('user','wish',array('id'=>$strUser['userid'],'page'=>''));
$lstart = $page*30-30;

$arrWishs = $new['user']->findAll('wish_users',array(
	'userid'=>$strUser['userid'],'status'=>2,
),'addtime desc',null,$lstart.',30');


foreach($arrWishs as $key => $item){
	$wish = aac('wish')->getWishByWishid($item['wishid']);
	$arrWish[]=$wish;
	$arrWish[$key]['user']=aac('user')->getOneUser($wish['userid']);

}

$wishNum = $new['user']->findCount('wish_users',array(
	'userid'=>$strUser['userid'],'status'=>2,
));
$pageUrl = pagination($wishNum, 30, $page, $url);

$title = $strUser['username'].'的活动';
include template('wish');